<template>
  <el-container>
    <el-main>
      <el-container class="parent-body">
        <el-header class="content-header">
          <i class="el-icon-s-unfold"></i>
          数据列表
          <div class="rightTop">
            <el-button @click="Return">
              <i class="el-icon-back" slot="prefix"></i>
              返回
            </el-button>
          </div>
        </el-header>
        <el-main class="info-main padding-style">
          <el-table :data="tableData" border style="width: 100%">
            <el-table-column prop="number" label="编号"></el-table-column>
            <el-table-column prop="salePrice" label="销售价格">
              <template scope="scope">
                <i slot="prefix"
                  >原:{{ tableData[scope.$index].salePrice.old }} 元</i
                >
                <p />
                <i slot="suffix"
                  >现:{{ tableData[scope.$index].salePrice.now }} 元</i
                >
              </template>
            </el-table-column>
            <el-table-column prop="PromotionPrice" label="促销价格">
              <template scope="scope">
                <i slot="prefix"
                  >原:{{ tableData[scope.$index].PromotionPrice.old }} 元</i
                >
                <p />
                <i slot="suffix"
                  >现:{{ tableData[scope.$index].PromotionPrice.now }} 元</i
                >
              </template>
            </el-table-column>
            <el-table-column prop="handsleJiang" label="赠送匠币">
              <template scope="scope">
                <i slot="prefix"
                  >原:{{ tableData[scope.$index].handsleJiang.old }}
                </i>
                <p />
                <i slot="suffix"
                  >现:{{ tableData[scope.$index].handsleJiang.now }}
                </i>
              </template>
            </el-table-column>
            <el-table-column prop="JiangBuyPower" label="匠币购买金额">
              <template scope="scope">
                <i slot="prefix"
                  >原:{{ tableData[scope.$index].JiangBuyPower.old }}
                </i>
                <p />
                <i slot="suffix"
                  >现:{{ tableData[scope.$index].JiangBuyPower.now }}
                </i>
              </template>
            </el-table-column>
            <el-table-column prop="UpOrDownShelf" label="上下架">
              <template scope="scope">
                <i slot="prefix"
                  >原:{{ tableData[scope.$index].UpOrDownShelf.old }}
                </i>
                <p />
                <i slot="suffix"
                  >现:{{ tableData[scope.$index].UpOrDownShelf.now }}
                </i>
              </template>
            </el-table-column>
            <el-table-column prop="checkStatus" label="审核状态">
              <template scope="scope">
                <i slot="prefix"
                  >原:{{ tableData[scope.$index].checkStatus.old }}
                </i>
                <p />
                <i slot="suffix"
                  >现:{{ tableData[scope.$index].checkStatus.now }}
                </i>
              </template>
            </el-table-column>
            <el-table-column
              prop="operateMessage"
              label="操作信息"
              width="200px"
            >
              <template scope="scope">
                <i slot="prefix"
                  >{{ tableData[scope.$index].operateMessage.user }}
                </i>
                <p />
                <i slot="suffix"
                  >{{ tableData[scope.$index].operateMessage.date }}
                </i>
              </template>
            </el-table-column>
          </el-table>
        </el-main>
        <el-footer class="info-foot">
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage4"
            :page-sizes="[10, 20, 50, 100]"
            :page-size="500"
            layout="total, sizes, prev, pager, next, jumper"
            :total="400"
          >
          </el-pagination>
        </el-footer>
      </el-container>
    </el-main>
  </el-container>
</template>
<script>
export default {
  data() {
    return {
      // 分页
      currentPage4: 1,
      tableData: [
        {
          number: "1000001",
          salePrice: { old: 100, now: 200 },
          PromotionPrice: { old: 100, now: 200 },
          handsleJiang: { old: 1000, now: 9595 },
          JiangBuyPower: { old: 1000, now: 9595 },
          UpOrDownShelf: { old: "上架中", now: "上架成功" },
          checkStatus: { old: "审核中", now: "审核成功" },
          operateMessage: { user: "admin", date: "2018-07-07 16:58:11" }
        },
        {
          number: "1000001",
          salePrice: { old: 100, now: 200 },
          PromotionPrice: { old: 100, now: 200 },
          handsleJiang: { old: 1000, now: 9595 },
          JiangBuyPower: { old: 1000, now: 9595 },
          UpOrDownShelf: { old: "上架中", now: "上架成功" },
          checkStatus: { old: "审核中", now: "审核成功" },
          operateMessage: { user: "admin", date: "2018-07-07 16:58:11" }
        },
        {
          number: "1000001",
          salePrice: { old: 100, now: 200 },
          PromotionPrice: { old: 100, now: 200 },
          handsleJiang: { old: 1000, now: 9595 },
          JiangBuyPower: { old: 1000, now: 9595 },
          UpOrDownShelf: { old: "上架中", now: "上架成功" },
          checkStatus: { old: "审核中", now: "审核成功" },
          operateMessage: { user: "admin", date: "2018-07-07 16:58:11" }
        },
        {
          number: "1000001",
          salePrice: { old: 100, now: 200 },
          PromotionPrice: { old: 100, now: 200 },
          handsleJiang: { old: 1000, now: 9595 },
          JiangBuyPower: { old: 1000, now: 9595 },
          UpOrDownShelf: { old: "上架中", now: "上架成功" },
          checkStatus: { old: "审核中", now: "审核成功" },
          operateMessage: { user: "admin", date: "2018-07-07 16:58:11" }
        }
      ]
    }
  },
  methods: {
    // 分页
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`)
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`)
    },
    Return() {
      this.$router.go(-1)
    }
  }
}
</script>
<style scoped>
.rightTop {
  float: right;
}
.goodsrecycle-button-select-2 {
  height: 50px;
  padding-top: 10px;
  padding-left: 20px;
}
.select-width-1 {
  width: 220px;
}
.select-width-2 {
  width: 150px;
}
.centerTag {
  text-align: center;
}
.dateCss {
  float: left;
}
</style>
